<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8"/>
    <title>登录页面</title>

    <link rel="stylesheet" type="text/css" href="js/jquery-easyui-1.7.0/themes/default/easyui.css"/>
    <link rel="stylesheet" type="text/css" href="js/jquery-easyui-1.7.0/themes/icon.css"/>
    <link rel="stylesheet" type="text/css" href="js/jquery-easyui-1.7.0/themes/color.css"/>
    <link rel="stylesheet" type="text/css" href="js/jquery-easyui-1.7.0/demo/demo.css"/>
    <script type="text/javascript" src="js/jquery-easyui-1.7.0/jquery.min.js"></script>
    <script type="text/javascript" src="js/jquery-easyui-1.7.0/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="js/jquery.cookie.js"></script>

    <script type="text/javascript" src="js/api/api.js"></script>
    <script type="text/javascript" src="js/pages/deptManage.js"></script>

    <style>
        html{width:100%;height:100%;}
        body{width:100%;height:100%;}
    </style>
</head>
<body class="easyui-layout" style="padding:0px;margin:0px;">
    <div data-options="region:'west',title:'West',split:true,collapsed:true"
         style="padding:20px 10px;width:300px;">
        <div>
            <a href="javascript:void(0)" style="width:50px;" onclick="addDeptNode()"  title="添加部门" class="easyui-linkbutton c1">添加</a>
            <a href="javascript:void(0)" style="width:50px;" onclick="editDeptWindowOpen()"  title="编辑部门" class="easyui-linkbutton c1">编辑</a>
            <a href="javascript:void(0)" style="width:50px;" onclick="removeDept()" title="删除部门" class="easyui-linkbutton c5">删除</a>
        </div>
        <div id="p" class="easyui-panel"
             style="width:98%;height:auto;padding:10px;background:#fafafa;margin-top:10px;"
             data-options="">
            <ul id="deptTree" class="easyui-tree"></ul>
        </div>
    </div>
    <div data-options="region:'center'" style="padding:5px;background:#eee;">
        <div>
            <table id="deptDataGrid" data-options="toolbar:'#deptManageTB'"></table>
        </div>
    </div>

    <div id="deptManageTB" style="padding:2px 5px;">
        <div>
            部门名称:<input id="deptNameCBBox" class="easyui-combobox" style="width:110px"/>
            部门编号:<input id="evpCodeCBBox" class="easyui-combobox" style="width:110px"/>
            <a href="javascript:void(0)" onclick="searchDeptList()" class="easyui-linkbutton" iconCls="icon-search">查询</a>
        </div>
    </div>

    <div id="editDeptWindow">
        <div class="easyui-panel" data-options="border:false"
             style="width:100%;padding:30px 60px;height:auto;">
            <form id="editDeptForm">
                <div style="margin-bottom:20px;display:none;">
                    <input class="easyui-textbox" name="id" style="width:100%;"
                           data-options="label:'部门ID:'"/>
                </div>
                <div style="margin-bottom:20px">
                    <input class="easyui-textbox" name="evpName" style="width:100%"
                           data-options="label:'部门名称:',required:true"/>
                </div>
                <div style="margin-bottom:20px">
                    <input class="easyui-textbox" name="evpCode" style="width:100%"
                           data-options="label:'部门编码:'"/>
                </div>
                <div style="margin-bottom:20px">
                    <input class="easyui-combobox" name="evpType" style="width:100%" data-options="
                        valueField: 'value',
                        textField: 'label',
                        label:'部门类型:',
                        editable:false,
                        panelHeight:'auto',
                        data: [{
                            label: '生产部门',
                            value: 'biz_dept_product'
                        },{
                            label: '行政部门',
                            value: 'biz_dept_administrative'
                        }]" />
                    <!--<input class="easyui-textbox" name="evpTitle" style="width:100%"-->
                           <!--data-options="label:'部门类型:',required:true"/>-->
                </div>
                <div style="margin-bottom:20px">
                    <!-- data-options="prompt:'Username',iconCls:'icon-man',iconWidth:38" -->
                    <input id="parentName" class="easyui-textbox" name="parentName" style="width:100%"
                           data-options="label:'父级部门:',editable:false"/>
                </div>
                <div style="margin-bottom:20px;display:none;">
                    <input id="parentId" class="easyui-textbox" name="parentId" style="width:100%;"
                           data-options="label:'父级部门ID:'" value="-1"/>
                </div>
                <div style="margin-bottom:20px">
                    <input class="easyui-numberspinner" value="0" name="orderNum"
                           data-options="label:'部门排序:',labelPosition:'left',spinAlign:'right'"
                           style="width:100%;"/>
                </div>
            </form>
            <div style="text-align:center;padding:5px 0">
                <a id="submitEditButton" href="javascript:void(0)" class="easyui-linkbutton c1" onclick="submitEditForm()"
                   style="width:80px;" data-options="">编辑</a>
                <a href="javascript:void(0)" class="easyui-linkbutton c7" onclick="clearForm()"
                   style="width:80px" data-options="">清空</a>
            </div>
        </div>
    </div>
</body>
</html>